package com.yjd.comm.counter.service;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.counter.model.CounterModel;

/**
 * <b>description</b>：活动信息表业务接口<br>
 * <b>time</b>：2015-05-11 14:35:18 <br>
 * <b>author</b>：  ready likun_557@163.com
 */
public interface ICounterService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public CounterModel insert(CounterModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(CounterModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(Long id) throws Exception;
	
	/**
	 * 向指定的counter添加数字,不支持添加负数
	 * @param counterType
	 * @param add_val
	 * @return
	 * @throws Exception
	 */
	public int addCurrentCounter(String counterType,int add_val) throws Exception; 

}
